<?php $this->load->module('mobile/index/header', $common);?>

<div class="content">
    <form action="" class="listForm" method="post">
        <input name="referer" value="<?php echo !empty($_GET['referer']) ? $_GET['referer'] : '';?>" type="hidden">
        <article class="bottom_c" id="payInfo">
            <section style="position: relative;">
                <span class="username fl">帐号</span>
                <span class="fRight fl">
                    <input name="Form[account]" placeholder="用户名/邮箱/手机" type="text" value="">
                </span>
            </section>
            <section style="position: relative;" class="b_noneborder">
                <span class="password fl">密码</span>
                <span class="fRight fl">
                    <input name="Form[password]" placeholder="请输入密码" type="password">
                </span>
            </section>
        </article>
        <div class="col_div">
            <a href="javascript:void(0);" class="btn btn-blue" title="登录">登 录</a>
        </div>
        <div class="log_ele clear">
            <a href="<?php echo site_url('mobile/member/register');?>">免费注册&gt;&gt;</a>
            <a href="<?php echo site_url('mobile/member/forgot');?>">忘记密码&gt;&gt;</a>
        </div>
    </form>
</div>

<?php $this->load->module('mobile/index/footer', $common);?>
<script type="text/javascript">
  function alert_popup(text){
      $.dialog({
          style:'tip',
          width:200,
          closeTime:1000,
          content: '<p style="text-align: center">'+text+'</p>'
      }).open();
  }

$(function(){

    $('.btn').click(function(){
        if($('input[name="Form[account]"]').val().length == 0){
            alert_popup('请输入手机号码');
            return false;
        }
        if($('input[name="Form[password]"]').val().length == 0){
            alert_popup('请输入密码');
            return false;
        }
        var account = $('input[name="Form[account]"]').val();
        var password = $('input[name="Form[password]"]').val();
        $.post('<?php echo $form_url ;?>',{
            account: account,
            password: password
            },function(data){
                  if(data.status=='1')
                  {
                      var history = $('input[name="referer"]').val();
                      if(history.length==0) {
                          
                          window.location.href = basemobileurl ;
                      }else{
                          window.location.href = baseurl+''+history ;
                      }

                  }
                  alert_popup(data.info);
            return false;
        },'json')
    })
});
</script>